package com.lhm.service;


import com.lhm.entity.BookType;
import com.lhm.mapper.BookTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class BookTypeServiceImpl implements BookTypeService {
    @Autowired
    BookTypeMapper bookTypeMapper;

    @Override
    public List<BookType> findAll() {
        return bookTypeMapper.findAll();
    }

    @Override
    public void add(String type) {
        bookTypeMapper.add(type);
    }

    @Override
    public void update(int id, String type) {
        bookTypeMapper.update(id, type);
    }

    @Override
    public BookType findById(Integer id) {
        return bookTypeMapper.findById(id);
    }
}
